package homework;

public class MaxOfArray {
    public static void main(String[] args) {
        int[] a = new int[10];
        for(int i = 0;i<a.length;i++){
            a[i] = (int)(Math.random()*100);
            System.out.println(a[i]);
        }
        int max = a[0];
        for(int i = 1;i<a.length;i++){
            if(max<a[i]){
                max = a[i];
            }
        }
        System.out.println("max = " + max);
    }
}
